/*
 * Copyright 2008 Nordic Consulting & Development Company
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package pl.ncdc.web.login.client.service;

import java.io.Serializable;

/**
 * Authentication result.
 * Poor man's enum substitute.
 * TODO it should be refactored to real enum as soon as they are available in GWT. 
 * <p>
 * Created on Apr 17, 2008
 *
 * @author hshsce
 * @version $Id: AuthenticationResult.java 11 2008-04-17 09:46:16Z hshsce $
 */
public class AuthenticationResult implements Serializable {

	private static final long serialVersionUID = -217500656499768506L;

	/**
	 * Correct authentication status code.
	 */
	public static final int OK = 0;

	/**
	 * Invalid user status code.
	 */
	public static final int INVALID_UID = 1;

	/**
	 * Invalid password status code.
	 */
	public static final int INVALID_PASSWORD = 2;

	private int m_code;

	public AuthenticationResult() {
		m_code = OK;
	}

	public AuthenticationResult(final int code) {
		m_code = code;
	}

	public int getCode() {
		return m_code;
	}

}
